3.3.14 \(\int (a g+b g x)^m (c i+d i x)^{-2-m} (A+B \log (e (\frac {a+b x}{c+d x})^n)) \, dx\) [214]

3.3.14.1 Optimal result
3.3.14.2 Mathematica [A] (verified)
3.3.14.3 Rubi [A] (verified)
3.3.14.4 Maple [B] (verified)
3.3.14.5 Fricas [B] (verification not implemented)
3.3.14.6 Sympy [F(-2)]
3.3.14.7 Maxima [F]
3.3.14.8 Giac [F]
3.3.14.9 Mupad [F(-1)]

3.3.14.1 Optimal result

Integrand size = 47, antiderivative size = 128 \[ \int (a g+b g x)^m (c i+d i x)^{-2-m} \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=-\frac {B n (a+b x) (g (a+b x))^m (i (c+d x))^{-m}}{(b c-a d) i^2 (1+m)^2 (c+d x)}+\frac {(a+b x) (g (a+b x))^m (i (c+d x))^{-m} \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(b c-a d) i^2 (1+m) (c+d x)} \]

output
-B*n*(b*x+a)*(g*(b*x+a))^m/(-a*d+b*c)/i^2/(1+m)^2/(d*x+c)/((i*(d*x+c))^m)+ 
(b*x+a)*(g*(b*x+a))^m*(A+B*ln(e*((b*x+a)/(d*x+c))^n))/(-a*d+b*c)/i^2/(1+m) 
/(d*x+c)/((i*(d*x+c))^m)
 
3.3.14.2 Mathematica [A] (verified)

Time = 0.63 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.61 \[ \int (a g+b g x)^m (c i+d i x)^{-2-m} \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=\frac {(a+b x) (g (a+b x))^m (i (c+d x))^{-1-m} \left (A+A m-B n+B (1+m) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(b c-a d) i (1+m)^2} \]

input
Integrate[(a*g + b*g*x)^m*(c*i + d*i*x)^(-2 - m)*(A + B*Log[e*((a + b*x)/( 
c + d*x))^n]),x]
 
output
((a + b*x)*(g*(a + b*x))^m*(i*(c + d*x))^(-1 - m)*(A + A*m - B*n + B*(1 + 
m)*Log[e*((a + b*x)/(c + d*x))^n]))/((b*c - a*d)*i*(1 + m)^2)
 
3.3.14.3 Rubi [A] (verified)

Time = 0.36 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.96, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.043, Rules used = {2963, 2741}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (a g+b g x)^m (c i+d i x)^{-m-2} \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right ) \, dx\)

\(\Big \downarrow \) 2963

\(\displaystyle \frac {(g (a+b x))^m (i (c+d x))^{-m} \left (\frac {a+b x}{c+d x}\right )^{-m} \int \left (\frac {a+b x}{c+d x}\right )^m \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )d\frac {a+b x}{c+d x}}{i^2 (b c-a d)}\)

\(\Big \downarrow \) 2741

\(\displaystyle \frac {(g (a+b x))^m (i (c+d x))^{-m} \left (\frac {a+b x}{c+d x}\right )^{-m} \left (\frac {\left (\frac {a+b x}{c+d x}\right )^{m+1} \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{m+1}-\frac {B n \left (\frac {a+b x}{c+d x}\right )^{m+1}}{(m+1)^2}\right )}{i^2 (b c-a d)}\)

input
Int[(a*g + b*g*x)^m*(c*i + d*i*x)^(-2 - m)*(A + B*Log[e*((a + b*x)/(c + d* 
x))^n]),x]
 
output
((g*(a + b*x))^m*(-((B*n*((a + b*x)/(c + d*x))^(1 + m))/(1 + m)^2) + (((a 
+ b*x)/(c + d*x))^(1 + m)*(A + B*Log[e*((a + b*x)/(c + d*x))^n]))/(1 + m)) 
)/((b*c - a*d)*i^2*((a + b*x)/(c + d*x))^m*(i*(c + d*x))^m)
 

3.3.14.3.1 Defintions of rubi rules used

rule 2741
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> 
Simp[(d*x)^(m + 1)*((a + b*Log[c*x^n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^( 
m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1]
 

rule 2963
Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*( 
B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m_.)*((h_.) + (i_.)*(x_))^(q_.), x_Symbol 
] :> Simp[d^2*((g*((a + b*x)/b))^m/(i^2*(b*c - a*d)*(i*((c + d*x)/d))^m*((a 
 + b*x)/(c + d*x))^m))   Subst[Int[x^m*(A + B*Log[e*x^n])^p, x], x, (a + b* 
x)/(c + d*x)], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, A, B, m, n, p, q}, x 
] && NeQ[b*c - a*d, 0] && EqQ[b*f - a*g, 0] && EqQ[d*h - c*i, 0] && EqQ[m + 
 q + 2, 0]
 
3.3.14.4 Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(816\) vs. \(2(128)=256\).

Time = 32.12 (sec) , antiderivative size = 817, normalized size of antiderivative = 6.38

method result size
parallelrisch \(-\frac {A x \left (g \left (b x +a \right )\right )^{m} \left (i \left (d x +c \right )\right )^{-2-m} a b \,d^{2} m n +A x \left (g \left (b x +a \right )\right )^{m} \left (i \left (d x +c \right )\right )^{-2-m} b^{2} c d m n +B x \left (g \left (b x +a \right )\right )^{m} \left (i \left (d x +c \right )\right )^{-2-m} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) a b \,d^{2} n +B x \left (g \left (b x +a \right )\right )^{m} \left (i \left (d x +c \right )\right )^{-2-m} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) b^{2} c d n +A \left (g \left (b x +a \right )\right )^{m} \left (i \left (d x +c \right )\right )^{-2-m} a b c d m n +B \left (g \left (b x +a \right )\right )^{m} \left (i \left (d x +c \right )\right )^{-2-m} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) a b c d n +B \,x^{2} \left (g \left (b x +a \right )\right )^{m} \left (i \left (d x +c \right )\right )^{-2-m} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) b^{2} d^{2} m n +B x \left (g \left (b x +a \right )\right )^{m} \left (i \left (d x +c \right )\right )^{-2-m} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) a b \,d^{2} m n +B x \left (g \left (b x +a \right )\right )^{m} \left (i \left (d x +c \right )\right )^{-2-m} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) b^{2} c d m n +B \left (g \left (b x +a \right )\right )^{m} \left (i \left (d x +c \right )\right )^{-2-m} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) a b c d m n +A \,x^{2} \left (g \left (b x +a \right )\right )^{m} \left (i \left (d x +c \right )\right )^{-2-m} b^{2} d^{2} m n -B \,x^{2} \left (g \left (b x +a \right )\right )^{m} \left (i \left (d x +c \right )\right )^{-2-m} b^{2} d^{2} n^{2}+A \,x^{2} \left (g \left (b x +a \right )\right )^{m} \left (i \left (d x +c \right )\right )^{-2-m} b^{2} d^{2} n +B \,x^{2} \left (g \left (b x +a \right )\right )^{m} \left (i \left (d x +c \right )\right )^{-2-m} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) b^{2} d^{2} n -B x \left (g \left (b x +a \right )\right )^{m} \left (i \left (d x +c \right )\right )^{-2-m} a b \,d^{2} n^{2}-B x \left (g \left (b x +a \right )\right )^{m} \left (i \left (d x +c \right )\right )^{-2-m} b^{2} c d \,n^{2}+A x \left (g \left (b x +a \right )\right )^{m} \left (i \left (d x +c \right )\right )^{-2-m} a b \,d^{2} n +A x \left (g \left (b x +a \right )\right )^{m} \left (i \left (d x +c \right )\right )^{-2-m} b^{2} c d n -B \left (g \left (b x +a \right )\right )^{m} \left (i \left (d x +c \right )\right )^{-2-m} a b c d \,n^{2}+A \left (g \left (b x +a \right )\right )^{m} \left (i \left (d x +c \right )\right )^{-2-m} a b c d n}{d b \left (a d -c b \right ) n \left (1+m \right )^{2}}\) \(817\)

input
int((b*g*x+a*g)^m*(d*i*x+c*i)^(-2-m)*(A+B*ln(e*((b*x+a)/(d*x+c))^n)),x,met 
hod=_RETURNVERBOSE)
 
output
-(A*x*(g*(b*x+a))^m*(i*(d*x+c))^(-2-m)*a*b*d^2*m*n+A*x*(g*(b*x+a))^m*(i*(d 
*x+c))^(-2-m)*b^2*c*d*m*n+B*x*(g*(b*x+a))^m*(i*(d*x+c))^(-2-m)*ln(e*((b*x+ 
a)/(d*x+c))^n)*a*b*d^2*n+B*x*(g*(b*x+a))^m*(i*(d*x+c))^(-2-m)*ln(e*((b*x+a 
)/(d*x+c))^n)*b^2*c*d*n+A*(g*(b*x+a))^m*(i*(d*x+c))^(-2-m)*a*b*c*d*m*n+B*( 
g*(b*x+a))^m*(i*(d*x+c))^(-2-m)*ln(e*((b*x+a)/(d*x+c))^n)*a*b*c*d*n+B*x^2* 
(g*(b*x+a))^m*(i*(d*x+c))^(-2-m)*ln(e*((b*x+a)/(d*x+c))^n)*b^2*d^2*m*n+B*x 
*(g*(b*x+a))^m*(i*(d*x+c))^(-2-m)*ln(e*((b*x+a)/(d*x+c))^n)*a*b*d^2*m*n+B* 
x*(g*(b*x+a))^m*(i*(d*x+c))^(-2-m)*ln(e*((b*x+a)/(d*x+c))^n)*b^2*c*d*m*n+B 
*(g*(b*x+a))^m*(i*(d*x+c))^(-2-m)*ln(e*((b*x+a)/(d*x+c))^n)*a*b*c*d*m*n+A* 
x^2*(g*(b*x+a))^m*(i*(d*x+c))^(-2-m)*b^2*d^2*m*n-B*x^2*(g*(b*x+a))^m*(i*(d 
*x+c))^(-2-m)*b^2*d^2*n^2+A*x^2*(g*(b*x+a))^m*(i*(d*x+c))^(-2-m)*b^2*d^2*n 
+B*x^2*(g*(b*x+a))^m*(i*(d*x+c))^(-2-m)*ln(e*((b*x+a)/(d*x+c))^n)*b^2*d^2* 
n-B*x*(g*(b*x+a))^m*(i*(d*x+c))^(-2-m)*a*b*d^2*n^2-B*x*(g*(b*x+a))^m*(i*(d 
*x+c))^(-2-m)*b^2*c*d*n^2+A*x*(g*(b*x+a))^m*(i*(d*x+c))^(-2-m)*a*b*d^2*n+A 
*x*(g*(b*x+a))^m*(i*(d*x+c))^(-2-m)*b^2*c*d*n-B*(g*(b*x+a))^m*(i*(d*x+c))^ 
(-2-m)*a*b*c*d*n^2+A*(g*(b*x+a))^m*(i*(d*x+c))^(-2-m)*a*b*c*d*n)/d/b/(a*d- 
b*c)/n/(1+m)^2
 
3.3.14.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 274 vs. \(2 (128) = 256\).

Time = 0.32 (sec) , antiderivative size = 274, normalized size of antiderivative = 2.14 \[ \int (a g+b g x)^m (c i+d i x)^{-2-m} \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=\frac {{\left (A a c m - B a c n + A a c + {\left (A b d m - B b d n + A b d\right )} x^{2} + {\left (A b c + A a d + {\left (A b c + A a d\right )} m - {\left (B b c + B a d\right )} n\right )} x + {\left (B a c m + B a c + {\left (B b d m + B b d\right )} x^{2} + {\left (B b c + B a d + {\left (B b c + B a d\right )} m\right )} x\right )} \log \left (e\right ) + {\left ({\left (B b d m + B b d\right )} n x^{2} + {\left (B b c + B a d + {\left (B b c + B a d\right )} m\right )} n x + {\left (B a c m + B a c\right )} n\right )} \log \left (\frac {b x + a}{d x + c}\right )\right )} {\left (b g x + a g\right )}^{m} e^{\left (-{\left (m + 2\right )} \log \left (b g x + a g\right ) + {\left (m + 2\right )} \log \left (\frac {b x + a}{d x + c}\right ) - {\left (m + 2\right )} \log \left (\frac {i}{g}\right )\right )}}{{\left (b c - a d\right )} m^{2} + b c - a d + 2 \, {\left (b c - a d\right )} m} \]

input
integrate((b*g*x+a*g)^m*(d*i*x+c*i)^(-2-m)*(A+B*log(e*((b*x+a)/(d*x+c))^n) 
),x, algorithm="fricas")
 
output
(A*a*c*m - B*a*c*n + A*a*c + (A*b*d*m - B*b*d*n + A*b*d)*x^2 + (A*b*c + A* 
a*d + (A*b*c + A*a*d)*m - (B*b*c + B*a*d)*n)*x + (B*a*c*m + B*a*c + (B*b*d 
*m + B*b*d)*x^2 + (B*b*c + B*a*d + (B*b*c + B*a*d)*m)*x)*log(e) + ((B*b*d* 
m + B*b*d)*n*x^2 + (B*b*c + B*a*d + (B*b*c + B*a*d)*m)*n*x + (B*a*c*m + B* 
a*c)*n)*log((b*x + a)/(d*x + c)))*(b*g*x + a*g)^m*e^(-(m + 2)*log(b*g*x + 
a*g) + (m + 2)*log((b*x + a)/(d*x + c)) - (m + 2)*log(i/g))/((b*c - a*d)*m 
^2 + b*c - a*d + 2*(b*c - a*d)*m)
 
3.3.14.6 Sympy [F(-2)]

Exception generated. \[ \int (a g+b g x)^m (c i+d i x)^{-2-m} \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=\text {Exception raised: HeuristicGCDFailed} \]

input
integrate((b*g*x+a*g)**m*(d*i*x+c*i)**(-2-m)*(A+B*ln(e*((b*x+a)/(d*x+c))** 
n)),x)
 
output
Exception raised: HeuristicGCDFailed >> no luck
 
3.3.14.7 Maxima [F]

\[ \int (a g+b g x)^m (c i+d i x)^{-2-m} \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=\int { {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )} {\left (b g x + a g\right )}^{m} {\left (d i x + c i\right )}^{-m - 2} \,d x } \]

input
integrate((b*g*x+a*g)^m*(d*i*x+c*i)^(-2-m)*(A+B*log(e*((b*x+a)/(d*x+c))^n) 
),x, algorithm="maxima")
 
output
integrate((B*log(e*((b*x + a)/(d*x + c))^n) + A)*(b*g*x + a*g)^m*(d*i*x + 
c*i)^(-m - 2), x)
 
3.3.14.8 Giac [F]

\[ \int (a g+b g x)^m (c i+d i x)^{-2-m} \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=\int { {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )} {\left (b g x + a g\right )}^{m} {\left (d i x + c i\right )}^{-m - 2} \,d x } \]

input
integrate((b*g*x+a*g)^m*(d*i*x+c*i)^(-2-m)*(A+B*log(e*((b*x+a)/(d*x+c))^n) 
),x, algorithm="giac")
 
output
integrate((B*log(e*((b*x + a)/(d*x + c))^n) + A)*(b*g*x + a*g)^m*(d*i*x + 
c*i)^(-m - 2), x)
 
3.3.14.9 Mupad [F(-1)]

Timed out. \[ \int (a g+b g x)^m (c i+d i x)^{-2-m} \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=\int \frac {{\left (a\,g+b\,g\,x\right )}^m\,\left (A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\right )}{{\left (c\,i+d\,i\,x\right )}^{m+2}} \,d x \]

input
int(((a*g + b*g*x)^m*(A + B*log(e*((a + b*x)/(c + d*x))^n)))/(c*i + d*i*x) 
^(m + 2),x)
 
output
int(((a*g + b*g*x)^m*(A + B*log(e*((a + b*x)/(c + d*x))^n)))/(c*i + d*i*x) 
^(m + 2), x)